﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Serveur.DataAccess.EF;

namespace DataFactory
{
    public static class StatisticsFactory
    {
        public static UnitStatistics getUnitStatistics(string name)
        {
            switch (name)
            {
                case "footman":
                    return new UnitStatistics()
                    {
                        ID = 1,
                        MaxHP = 10,
                        Attack = 3,
                        Defense = 2,
                        Speed = 3,
                        Dexterity = 2
                    };
                case "archer":
                    return new UnitStatistics()
                    {
                        ID = 2,
                        MaxHP = 8,
                        Attack = 1,
                        Defense = 1,
                        Speed = 4,
                        Dexterity = 3,
                        MinRange = 3,
                        MaxRange = 6
                    };
                case "knight":
                    return new UnitStatistics()
                    {
                        ID = 3,
                        MaxHP = 15,
                        Attack = 4,
                        Defense = 3,
                        Speed = 2,
                        Dexterity = 3
                    };
                case "militian":
                    return new UnitStatistics()
                    {
                        ID = 4,
                        MaxHP = 9,
                        Attack = 2,
                        Defense = 1,
                        Speed = 4,
                        Dexterity = 2
                    };
                case "knife_thrower":
                    return new UnitStatistics()
                    {
                        ID = 5,
                        MaxHP = 9,
                        Attack = 2,
                        Defense = 1,
                        Speed = 5,
                        Dexterity = 4,
                        MinRange = 2,
                        MaxRange = 4
                    };
                case "ranger":
                    return new UnitStatistics()
                    {
                        ID = 6,
                        MaxHP = 12,
                        Attack = 3,
                        Defense = 2,
                        Speed = 4,
                        Dexterity = 4,
                        MinRange = 1,
                        MaxRange = 6
                    };
                default:
                    break;
            }
            throw new Exception("Asked for a statistics sheet that does not exist : " + name);
        }
    }
}
